﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Metropolicity
{
    class PopupLoseScene : InteractableScene
    {
        //Code to popup a window displaying these stats needs to trigger here
       
        private GameObject background;
        public MenuItem newGameButton;
       
        public TokenGameObject sorryText;
       
        public Boolean dismissed;
        public Boolean newGame;

        public PopupLoseScene()
            : base()
        {
            this.dismissed = true;

            gameObjects = new System.Collections.Generic.List<GameObject>();

            this.cursorRectangle = new Rectangle(
                (int)cursor.mouse.X,
                (int)cursor.mouse.Y,
                1,
                1
            );
            gameObjects.Add(new CursorGameObject(cursor));

            this.sceneIndex = SceneIndex.PopupScoreScene;

            this.background = new GameObject("menu/menu", new Vector2(Game1.CAMERA_WIDTH / 2, Game1.CAMERA_HEIGHT / 2));
            this.background.zindex = 0.8f;
            gameObjects.Add(this.background);

            this.sorryText = new TokenGameObject(new Vector2(Game1.CAMERA_WIDTH/2, 145), "Tarnation, you lose!");
            this.newGameButton = new MenuItem(new Vector2(Game1.CAMERA_WIDTH / 2, 345), "New Game");
           
            this.sorryText.zindex = .9f;
            this.newGameButton.zindex = .9f;
           
            this.sorryText.fontPath = "fonts/Western";
            this.sorryText.fontColor = Color.Red;
            this.newGameButton.fontPath = "fonts/Western";

         
            gameObjects.Add(this.sorryText);
            gameObjects.Add(this.newGameButton);
           
        }

        public void fillIn()
        {
           
        }

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
            if (cursor.clicking)
            {
                newGame = true;
                dismissed = true;
            }
        }
    }
}
